package com.db.stexchem.client.gui;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

/**
 * Contains the Order table.
 */
public class ExecutionPanel extends JPanel {
  
  private JTable executionTable = null;
  
  public ExecutionPanel(ExecutionTableModel executionTableModel) {
    setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    setLayout(new GridBagLayout());
    GridBagConstraints constraints = new GridBagConstraints();
    constraints.fill = GridBagConstraints.BOTH;
    constraints.weightx = 1;
    constraints.weighty = 1;
    
    executionTable = new ExecutionTable(executionTableModel);
    add(new JScrollPane(executionTable), constraints);
  }
  
  public JTable executionTable() {
    return executionTable;
  }
}
